package com.shop.cereshop.app.dao.seckill;

import com.shop.cereshop.app.domain.activity.ActivityData;
import com.shop.cereshop.app.page.tool.ToolProduct;
import com.shop.cereshop.commons.domain.tool.CereShopSeckillDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface CereShopSeckillDetailDAO {
    int insert(CereShopSeckillDetail record);

    int insertSelective(CereShopSeckillDetail record);

    CereShopSeckillDetail findSkuDetail(@Param("shopSeckillId") Long shopSeckillId, @Param("orderId") Long orderId);

    void updateNumber(CereShopSeckillDetail detail);

    ActivityData findPriceBySkuId(@Param("skuId") Long skuId);

    List<ToolProduct> findDistinctProducts(@Param("shopSeckillId") Long shopSeckillId);

    int findNumber(@Param("shopSeckillId") Long shopSeckillId, @Param("skuId") Long skuId);

    void updateBatch(@Param("list") List<CereShopSeckillDetail> list);

    List<CereShopSeckillDetail> findNumberDetails(@Param("orderId") Long orderId, @Param("shopSeckillId") Long shopSeckillId);

}